<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./template/template_1.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui">

    <ui:define name="content">
        <h:form>
            <p:panel id="panel" header="Creation d'un nouveau compte">
                <p:messages />
                <h:panelGrid columns="3" cellpadding="5">  
                    <h:outputLabel for="Login" value="Login: *" />  
                    <p:inputText id="login"   
                                 value="#{userManagedBean.username}"   
                                 required="true" label="Login">  
                        <f:validateLength minimum="2" />  
                    </p:inputText>  
                    <p:message for="login" />
                    <h:outputLabel for="password" value="password: *" />  
                    <p:inputText id="password"   
                                 value="#{userManagedBean.password}"   
                                 required="true" label="Password"/>
                    <p:message for="password" />
                </h:panelGrid>
                <p:commandButton value="Creer" update="panel"   
                                 actionListener="#{userManagedBean.addNewUSer()}" />
            </p:panel>
        </h:form>
    </ui:define>
</ui:composition>
